<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <IncludeRemoteExecutor>true</IncludeRemoteExecutor>
    <!-- xUnit2008 is about regexes and isn't appropriate in the test project for regexes -->
    <!-- SYSLIB0036 is about obsoletion of regex members -->
    <!-- SYSLIB1045 is for switching to GeneratedRegex -->
    <NoWarn>$(NoWarn);xUnit2008;SYSLIB0036;SYSLIB1045</NoWarn>
    <TargetFrameworks>$(NetCoreAppCurrent);$(NetFrameworkCurrent)</TargetFrameworks>
    <DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(TargetOS)' == 'browser'">true</DebuggerSupport>
    <EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
    <IsHighAotMemoryUsageTest>true</IsHighAotMemoryUsageTest> <!-- to avoid OOMs with source generation in wasm: https://github.com/dotnet/runtime/pull/60701 -->

     <!-- some tests require full ICU data, force it -->
    <WasmIncludeFullIcuData>true</WasmIncludeFullIcuData>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="AttRegexTests.cs" />
    <Compile Include="CaptureCollectionTests.cs" />
    <Compile Include="GroupCollectionTests.cs" />
    <Compile Include="MatchCollectionTests.cs" />
    <Compile Include="MonoRegexTests.cs" />
    <Compile Include="Regex.CompileToAssembly.Tests.cs" />
    <Compile Include="Regex.Ctor.Tests.cs" />
    <Compile Include="Regex.Cache.Tests.cs" />
    <Compile Include="Regex.EscapeUnescape.Tests.cs" />
    <Compile Include="Regex.GetGroupNames.Tests.cs" />
    <Compile Include="Regex.Groups.Tests.cs" />
    <Compile Include="Regex.KnownPattern.Tests.cs" />
    <Compile Include="Regex.Match.Tests.cs" />
    <Compile Include="Regex.MultipleMatches.Tests.cs" />
    <Compile Include="Regex.Replace.Tests.cs" />
    <Compile Include="Regex.Split.Tests.cs" />
    <Compile Include="Regex.Tests.Common.cs" />
    <Compile Include="Regex.UnicodeChar.Tests.cs" />
    <Compile Include="RegexCharacterSetTests.cs" />
    <Compile Include="RegexCultureTests.cs" />
    <Compile Include="RegexMatchTimeoutExceptionTests.cs" />
    <Compile Include="RegexParserTests.cs" />
    <Compile Include="RegexPcreTests.cs" />
    <Compile Include="RegexRustTests.cs" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
    <Compile Include="..\..\src\System\Text\RegularExpressions\RegexParseError.cs" Link="System\Text\RegularExpressions\RegexParseError.cs" />
    <Compile Include="RegexAssert.netfx.cs" />
    <Compile Include="RegexParserTests.netfx.cs" />
    <Compile Include="RegexGeneratorHelper.netfx.cs" />
    <Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\StringSyntaxAttribute.cs" />
    <ProjectReference Include="$(LibrariesProjectRoot)System.Text.Json\src\System.Text.Json.csproj" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
    <Compile Include="CustomDerivedRegexScenarioTest.cs" />
    <Compile Include="CSharpCodeFixVerifier`2.cs" />
    <Compile Include="UpgradeToGeneratedRegexAnalyzerTests.cs" />
    <Compile Include="RegexRunnerTests.cs" />
    <Compile Include="Regex.Count.Tests.cs" />
    <Compile Include="RegexAssert.netcoreapp.cs" />
    <Compile Include="RegexParserTests.netcoreapp.cs" />
    <Compile Include="Regex.EnumerateMatches.Tests.cs" />
    <Compile Include="RegexIgnoreCaseTests.cs" />
    <Compile Include="GroupCollectionReadOnlyDictionaryTests.cs" />
    <Compile Include="CaptureCollectionTests2.cs" />
    <Compile Include="GroupCollectionTests2.cs" />
    <Compile Include="MatchCollectionTests2.cs" />
    <Compile Include="PrecompiledRegexScenarioTest.cs" />
    <Compile Include="RegexCompilationInfoTests.cs" />
    <Compile Include="GeneratedRegexAttributeTests.cs" />
    <Compile Include="RegexGeneratorOutputTests.cs" />
    <Compile Include="RegexGeneratorParserTests.cs" />
    <Compile Include="RegexGroupNameTests.cs" />
    <Compile Include="RegexExperiment.cs" />
    <Compile Include="RegexGeneratorHelper.netcoreapp.cs" />
    <Compile Include="$(CommonTestPath)System\Diagnostics\DebuggerAttributes.cs" Link="Common\System\Diagnostics\DebuggerAttributes.cs" />

    <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="$(MicrosoftCodeAnalysisVersion)" PrivateAssets="all" />
    <PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="$(CompilerPlatformTestingVersion)" />
    <PackageReference Include="Microsoft.CodeAnalysis" Version="$(MicrosoftCodeAnalysisVersion)" />

    <!-- Upgrade transitive references of Microsoft.CodeAnalysis.Analyzer.Testing which bring in NS 1.x deps -->
    <PackageReference Include="DiffPlex" Version="$(CompilerPlatformTestingDiffPlexVersion)" />
    <PackageReference Include="Microsoft.VisualBasic" Version="$(CompilerPlatformTestingMicrosoftVisualBasicVersion)" />
    <PackageReference Include="Microsoft.VisualStudio.Composition" Version="$(CompilerPlatformTestingMicrosoftVisualStudioCompositionVersion)" />

    <ProjectReference Include="..\..\gen\System.Text.RegularExpressions.Generator.csproj"
                      SetTargetFramework="TargetFramework=netstandard2.0"
                      OutputItemType="Analyzer"
                      ReferenceOutputAssembly="true" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="System.Text.RegularExpressions.TestData" Version="$(SystemTextRegularExpressionsTestDataVersion)" />
  </ItemGroup>
  <ItemGroup>
    <HighAotMemoryUsageAssembly Include="Microsoft.CodeAnalysis.CSharp.dll" />
  </ItemGroup>
</Project>
